package com.zimi.code.service;

import com.zimi.util.CodeUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class CodeService {

    @Value("${spring.datasource.url:jdbc:mysql://192.168.66.250:3306/database?serverTimezone=GMT%2B8}")
    private String url;

    @Value("${spring.datasource.username:root}")
    private String username;

    @Value("${spring.datasource.password:root}")
    private String password;

    @Value("${spring.datasource.driver-class-name:com.mysql.cj.jdbc.Driver}")
    private String driver;

    private String author = "lnintr";

    public String generator(String str) {
        return new CodeUtil(author, url, username, password, driver, str).Generator();
    }
}
